package cn.imvc.app.models;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import cn.imvc.app.domains.AppResult;
import cn.imvc.app.entities.Favorites;
import cn.imvc.app.entities.Member;

/**
 * 收藏service
 * @author lijibo
 *
 */
public interface FavoritesModel {
	/**
	 * 添加收藏
	 * @param skuId
	 * @param goodsId
	 * @param member
	 * @return
	 */
	Favorites saveFavorite(Integer skuId, Integer goodsId, Member member);
	/**
	 * 根据用户id和skuid 查询favorite对象
	 * @param memberId
	 * @param skuId
	 * @return
	 */
	Favorites getFavoriteByMemberIdAndSkuId(Integer memberId, Integer skuId);
	
	Page<Favorites> findByMemberId(Integer memberId,PageRequest pageRequest);
	
	void deleteFavorites(String ids,Member member) throws Exception;
}
